using System;
using System.Collections.Generic;

namespace Finance.Web.Models
{
    public class UserDepositViewModel
    {
        public UserDepositViewModel(UserDeposit ud)
        {
            this.UserCode = ud.UserCode;
            this.DepositName = ud.Deposit.Name;
            this.Period = ud.Deposit.PeriodPayment;
            this.DepCode = ud.DepCode;
            this.OpeningDate = ud.OpeningDate;
            this.EndDate = ud.EndDate;
            this.Amount = ud.Amount;
        }

        public int UserCode { get; set; }

        public string DepositName { get; set; }

        public int DepCode { get; set; }

        public DateTime? OpeningDate { get; set; }

        public DateTime? EndDate { get; set; }

        public double? Amount { get; set; }

        public int? Period { get; set; }
    }

    public partial class UserDeposit
    {
        public int UserCode { get; set; }
        public int DepCode { get; set; }
        public Nullable<double> Amount { get; set; }
        public Nullable<System.DateTime> OpeningDate { get; set; }
        public Nullable<System.DateTime> EndDate { get; set; }
        public virtual Deposit Deposit { get; set; }
        public virtual User User { get; set; }
    }
}
